# Contributor: Emmanuel Frecon <efrecon@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tcl-tls
pkgver=1.7.22
pkgrel=4
pkgdesc="OpenSSL extension to Tcl"
url="https://core.tcl.tk/tcltls/"
arch="all"
license="TCL"
makedepends="tcl-dev openssl-dev>3"
source="https://core.tcl.tk/tcltls/uv/tcltls-$pkgver.tar.gz"

builddir="$srcdir/tcltls-$pkgver"
options="!check"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-shared \
		--with-ssl-dir=/usr
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="28c76a6e7333b6ed1d83234691d61c9e71a59d0a6a28182fc0f50e97cae7b54da63ac76527e3b16087f3eab0b9cfe19bad02362e485d0cf378724de534805e99  tcltls-1.7.22.tar.gz"
